home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / xrf.arc / XRF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1986-04-20  |  4.4 KB  |  106 lines

  1. /*
  2.  *                      *************
  3.  *                      * X R F . H *
  4.  *                      *************
  5.  *
  6.  * This is the common header for the C xrf'er.
  7.  *
  8.  * Version V1.3          9-May-80
  9.  * Version V1.4        10-Jul-80 MM
  10.  * Version V1.5         2-Jan-85 MC    Rainbow implementation
  11.  * Version V1.6        12-Jan-85 MC    allow for procid (2 extraa chars)
  12.  */
  13. #define SCPS    8               /* CI86 Relevant characters per symbol SMALL*/
  14. #define LCPS    31              /* CI86 Relevant characters per symbol LARGE*/
  15.  
  16. #define FFLAG   2               /* number of chars added to Symbol for procid*/
  17. #define NCPS    LCPS+FFLAG      /* CI86 max Symbol size  [incl proc id '()'] */
  18. #define KEYSIZE NCPS+NCPS+8     /* max key size */
  19. #define CPS    symbolsize+FFLAG /* actual chars per Symbol [inc procid '()'] */
  20. #define LWIDTH  132             /* Listing width, characters */
  21. #define RSIZE   5        /* Reference width in format statement */
  22. #define MAXLIN  57              /* Listing lines per page (excl. header) */
  23.  
  24. /*
  25.  * Structure definitions.
  26.  */
  27.  
  28. struct  ref     {                       /* REFERENCE LIST NODE */
  29.                 int lno;                /* Line number of reference */
  30.                 struct ref *next;       /* Link to next ref in chain */
  31.                 };
  32.  
  33. struct  idt     {                       /* ID TREE NODE STRUCTURE */
  34.                 char *keyp;             /* Pointer to stashed key string */
  35.                 struct ref *first;      /* Pointer to head of ref chain */
  36.                 struct ref *last;       /* Pointer to tail of ref chain */
  37.                 struct idt *left;       /* Left link in id tree */
  38.                 struct idt *right;      /* Right link in id tree */
  39.                 };
  40.  
  41. struct BUFR {
  42.     char b_key[NCPS+NCPS+8+1];    /* key */
  43.     int  b_ref;            /* reference */
  44.     };
  45.  
  46. struct dsk      {                       /* MEMORY DUMP NODE */
  47.                 FILE *mdnfile;
  48.                 char mdnfname[65];         /* file name */
  49.                 int mdncnt;              /* item count */
  50.                 struct dsk *mdnprev;       /* last one in chain */
  51.                 struct dsk *mdnnext;       /* next one in chain */
  52.                 int mdnempty;              /* 1= buffer empty */
  53.                 int mdneof;                /* 1= end of file reading */
  54.                 struct BUFR *mdnbuf;       /* buffer */
  55.                 };
  56.  
  57.  
  58. /*
  59.  * Global Variables.
  60.  */
  61.  
  62. extern FILE *fopen();           /* returns file pointer */
  63. extern FILE *freopen();         /* returns file pointer */
  64. extern FILE *src;               /* Source file pointer */
  65. extern FILE *lst;               /* List file pointer */
  66.  
  67. extern int funflg;              /* Function calls only flag */
  68. extern int prnflg;              /* Print source file flag */
  69. extern int conflg;              /* Concatanate source file flag */
  70. extern int verbose;             /* chatty mode flag */
  71.  
  72. extern char scanbf[LWIDTH+1];   /* Source line scan buffer */
  73. extern char *scanp;             /* Scan pointer */
  74.  
  75. extern char idbuf[NCPS+1];      /* ID string buffer */
  76. extern char lastsym[NCPS+1];    /* previous symbol [XRF3] (avoid repitition) */
  77.  
  78. extern char progname[9];    /* current source program name */
  79. extern char pghead[LWIDTH+1];   /* Listing page heading */
  80. extern char thetime[9];         /* For unix flavored systems*/
  81. extern char thedate[23];        /* For unix flavored systems*/
  82.  
  83. extern int  lineno;             /* Current source line number */
  84. extern int  linpg;              /* Lines-per-page count */
  85. extern int  linewidth;        /* line width */
  86. extern int  rperline;        /* References per line */
  87. extern int  symbolsize;        /* Symbol size (df=8) (-i changes to NCPS)*/
  88.  
  89. extern int  lintot;             /* line count total */
  90. extern int  namtot;             /* name count total */
  91. extern int  reftot;             /* reference count total */
  92. extern int  namcnt;             /* name count this file */
  93. extern int  refcnt;             /* reference count this file */
  94.  
  95. extern int wfilno;              /*     'polyphase ds merge chain' fileno*/
  96. extern struct dsk *polroot;     /* --> 'polyphase disk merge chain' root*/
  97. extern struct dsk *polcurr;     /* --> 'polyphase disk merge chain' current*/
  98. extern struct dsk *wropen();    /* --> 'polyphase disk merge chain' entry */
  99. extern unsigned char wpath[65];
  100.  
  101. extern struct idt *root;        /* --> root of ident tree */
  102.              };
  103.  
  104.  
  105. /*
  106.  * G